<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>gamvas.Camera</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.51 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="gamvas.Camera"></a>gamvas.<wbr>Camera</h1><div class=CBody><h4 class=CHeading>Description</h4><p>The camera class.</p><h4 class=CHeading>Note</h4><p>Every <a href="gamvas-state-state-js.html#gamvas.State" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">gamvas.State</a> has a default camera, which you can access with this.camera</p><h4 class=CHeading>Constructor</h4><p>new gamvas.Camera([x], [y], [rot], [zoom]);</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x/y</td><td class=CDLDescription>The position of the cameras center (optional)</td></tr><tr><td class=CDLEntry>rot</td><td class=CDLDescription>The rotation of the camera in radians (optional)</td></tr><tr><td class=CDLEntry>zoom</td><td class=CDLDescription>The zoom factor of the camera (optional)</td></tr></table><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#gamvas.Camera" >gamvas.<wbr>Camera</a></td><td class=SDescription>The camera class.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.Camera.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.position" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">position</a></td><td class=SDescription>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object that holds the position of the camera. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#gamvas.Camera.rotation" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">rotation</a></td><td class=SDescription>The rotation of the camera in radians. </td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.zoomFactor" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">zoomFactor</a></td><td class=SDescription>The zoom factor of the camera. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#gamvas.Camera.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.setPosition" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">setPosition</a></td><td class=SDescription>Set the position of the camera to absolute values.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Camera.move" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">move</a></td><td class=SDescription>Move the camera, relative to its current position.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.setRotation" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">setRotation</a></td><td class=SDescription>Set the rotation to a specific degree in radians</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Camera.rotate" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">rotate</a></td><td class=SDescription>Rotate the camera for r radians</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.setZoom" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">setZoom</a></td><td class=SDescription>Set a specific zoom level to the camera.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Camera.zoom" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">zoom</a></td><td class=SDescription>Zoom the camera</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.start" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">start</a></td><td class=SDescription>Start the camera. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Camera.stop" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">stop</a></td><td class=SDescription>Stop the camera, everything drawn from now on will not be under the influence of the camera. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#gamvas.Camera.toWorld" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">toWorld</a></td><td class=SDescription>Convert screen coordinates to world coordinates. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#gamvas.Camera.toScreen" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">toScreen</a></td><td class=SDescription>Convert world coordinates to screen coordinates. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.Variables"></a>Variables</h3></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.position"></a>position</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.position</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>A <a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link16 onMouseOver="ShowTip(event, 'tt2', 'link16')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a> object that holds the position of the camera.&nbsp; It is recommended to use it only for reading.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.rotation"></a>rotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.rotation</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The rotation of the camera in radians.&nbsp; It is recommended to use it only for reading.</p></div></div></div>

<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.zoomFactor"></a>zoomFactor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.zoomFactor</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>The zoom factor of the camera.&nbsp; It is recommended to use it only for reading.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.setPosition"></a>setPosition</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setPosition = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the position of the camera to absolute values.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>The new x position of the cameras center</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>The new y position of the cameras center</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.move"></a>move</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.move = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Move the camera, relative to its current position.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>The amount of pixels to move along the horizontal axis</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>The amount of pixels to move along the vertical axis</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.setRotation"></a>setRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setRotation = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set the rotation to a specific degree in radians</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>rotation in radians</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.rotate"></a>rotate</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.rotate = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Rotate the camera for r radians</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>r</td><td class=CDLDescription>rotation in radians</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.setZoom"></a>setZoom</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setZoom = function(</td><td class="PParameter  prettyprint " nowrap>z</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Set a specific zoom level to the camera.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>z</td><td class=CDLDescription>the zoom level, as 1 = original size, &lt; 1 = zoom out, &gt; 1 = zoom in</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.zoom"></a>zoom</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.zoom = function(</td><td class="PParameter  prettyprint " nowrap>z</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Zoom the camera</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>z</td><td class=CDLDescription>the change of zoom, relative to its current zoom</td></tr></table></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.start"></a>start</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">gamvas.Camera.prototype.start = function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Start the camera.&nbsp; Needs to be called before every drawing operation that should be in the influence of the camera (e.g. your game actors)</p><h4 class=CHeading>See</h4><p><a href="#gamvas.Camera.stop" class=LFunction id=link17 onMouseOver="ShowTip(event, 'tt12', 'link17')" onMouseOut="HideTip('tt12')">gamvas.Camera.stop</a></p><h4 class=CHeading>Example</h4><blockquote><pre>this.camera.start();
// draw everything under camera influence
this.drawGameObjects();
this.camera.stop();
// draw everything not under camera influence (e.g. Score, Health, ...)
this.drawHUD();</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.stop"></a>stop</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">gamvas.Camera.prototype.stop = function()</td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Stop the camera, everything drawn from now on will not be under the influence of the camera.&nbsp; You usually do this before drawing player score and health.</p><h4 class=CHeading>See</h4><p><a href="#gamvas.Camera.start" class=LFunction id=link18 onMouseOver="ShowTip(event, 'tt11', 'link18')" onMouseOut="HideTip('tt11')">gamvas.Camera.start</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.toWorld"></a>toWorld</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.toWorld = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Convert screen coordinates to world coordinates.&nbsp; For example if you have a rotated camera and the user clicks on the screen, use this function to check which position the click on the rotated camera is in the unrotated world.</p><h4 class=CHeading>Returns</h4><p><a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link19 onMouseOver="ShowTip(event, 'tt2', 'link19')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></p><h4 class=CHeading>See</h4><p><a href="#gamvas.Camera.toScreen" class=LFunction id=link20 onMouseOver="ShowTip(event, 'tt14', 'link20')" onMouseOut="HideTip('tt14')">gamvas.Camera.toScreen</a></p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="gamvas.Camera.toScreen"></a>toScreen</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.toScreen = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><h4 class=CHeading>Description</h4><p>Convert world coordinates to screen coordinates.&nbsp; If you have a object in your world and your camera has moved 3 screen aside, this function gets you the actual screen position of the object.</p><h4 class=CHeading>Returns</h4><p><a href="gamvas-vector2d-js.html#gamvas.Vector2D" class=LClass id=link21 onMouseOver="ShowTip(event, 'tt2', 'link21')" onMouseOut="HideTip('tt2')">gamvas.Vector2D</a></p><h4 class=CHeading>See</h4><p><a href="#gamvas.Camera.toWorld" class=LFunction id=link22 onMouseOver="ShowTip(event, 'tt13', 'link22')" onMouseOut="HideTip('tt13')">gamvas.Camera.toWorld</a></p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile><a href="gamvas-base-js.html">gamvas</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actor-js.html">gamvas.<wbr>Actor</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-actorstate-js.html">gamvas.<wbr>ActorState</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-animation-js.html">gamvas.<wbr>Animation</a></div></div><div class=MEntry><div class=MFile id=MSelected>gamvas.<wbr>Camera</div></div><div class=MEntry><div class=MFile><a href="gamvas-class-js.html">gamvas.<wbr>Class</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-dom-js.html">gamvas.dom</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-event-js.html">gamvas.<wbr>event</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-image-js.html">gamvas.<wbr>Image</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-key-js.html">gamvas.key</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-mouse-js.html">gamvas.<wbr>mouse</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-particleemitter-js.html">gamvas.<wbr>ParticleEmitter</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-js.html">gamvas.<wbr>physics</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-physics-userdata-js.html">gamvas.<wbr>physics.<wbr>UserData</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-rect-js.html">gamvas.Rect</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-resource-js.html">gamvas.<wbr>Resource</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-screen-js.html">gamvas.<wbr>screen</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-sound-js.html">gamvas.<wbr>Sound</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-js.html">gamvas.<wbr>state</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-state-state-js.html">gamvas.<wbr>State</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-timer-js.html">gamvas.<wbr>timer</a></div></div><div class=MEntry><div class=MFile><a href="gamvas-vector2d-js.html">gamvas.<wbr>Vector2D</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Macros.html">Macros</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Macros">Macros</option><option value="Variables">Variables</option></select></div></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.position</td></tr></table></blockquote>A gamvas.Vector2D object that holds the position of the camera. </div></div><div class=CToolTip id="tt2"><div class=CClass>A 2D vector class</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.rotation</td></tr></table></blockquote>The rotation of the camera in radians. </div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.zoomFactor</td></tr></table></blockquote>The zoom factor of the camera. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setPosition = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the position of the camera to absolute values.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.move = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Move the camera, relative to its current position.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setRotation = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set the rotation to a specific degree in radians</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.rotate = function(</td><td class="PParameter  prettyprint " nowrap>r</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Rotate the camera for r radians</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.setZoom = function(</td><td class="PParameter  prettyprint " nowrap>z</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Set a specific zoom level to the camera.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.zoom = function(</td><td class="PParameter  prettyprint " nowrap>z</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Zoom the camera</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">gamvas.Camera.prototype.start = function()</td></tr></table></blockquote>Start the camera. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">gamvas.Camera.prototype.stop = function()</td></tr></table></blockquote>Stop the camera, everything drawn from now on will not be under the influence of the camera. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.toWorld = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Convert screen coordinates to world coordinates. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>gamvas.Camera.prototype.toScreen = function(</td><td class="PParameter  prettyprint " nowrap>x,</td></tr><tr><td></td><td class="PParameter  prettyprint " nowrap>y</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Convert world coordinates to screen coordinates. </div></div><div class=CToolTip id="tt15"><div class=CClass>Game state class, overwrite for own states</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>